#include<bits/stdc++.h>

using namespace std;

int main() {
    vector<int> a;
    for (int i = 0; i < 10; i++) {
        a.push_back(rand() % 100);
    }
    cout << a.size() << endl;//10
    for (int i = 0; i < a.size(); i++) {
        cout << a[i] << " ";
    }
    cout << endl;
    //sort(a,a+n);//sort for primary array
    sort(a.begin(), a.end());
    for (auto i:a) { //for_each
        cout << i << endl;
    }
    return 0;
}
